﻿using System;
using System.Runtime.Serialization;
using System.Xml.Serialization;

namespace MugenMvvmToolkit.Models
{
    /// <summary>
    ///     Represents the entity state.
    /// </summary>
    [Flags]
#if WPF
    [Serializable]
#endif
    [DataContract]
    public enum EntityState : byte
    {
        /// <summary>
        ///     Unchanged state.
        /// </summary>
        [EnumMember, XmlEnum]
        Unchanged = 1,

        /// <summary>
        ///     Added state.
        /// </summary>
        [EnumMember, XmlEnum]
        Added = 2,

        /// <summary>
        ///     Deleted state.
        /// </summary>
        [EnumMember, XmlEnum]
        Deleted = 4,

        /// <summary>
        ///     Modified state.
        /// </summary>
        [EnumMember, XmlEnum]
        Modified = 8,

        /// <summary>
        ///     Detached state.
        /// </summary>
        [EnumMember, XmlEnum]
        Detached = 16
    }
}